-- GENERATED SPELL FOR [Brakgul Deathbringer] --


function spell0_3890(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3890', 638, 1)
end

function spell1_3890(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3890', 5319, 1)
end

function spell2_3890(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_3890', 620, 1)
end

function spell3_3890(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_3890', 2000, 1)
end

function Sorts_3890(pUnit, Event)
local choix_sorts_3890 = math.random(0, 3)
if choix_sorts_3890 == 0 then
pUnit:RegisterEvent('spell0_3890', 1, 1)
end
if choix_sorts_3890 == 1 then
pUnit:RegisterEvent('spell1_3890', 1, 1)
end
if choix_sorts_3890 == 2 then
pUnit:RegisterEvent('spell2_3890', 1, 1)
end
if choix_sorts_3890 == 3 then
pUnit:RegisterEvent('spell3_3890', 1, 1)
end
end

function mob3890_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3890', math.random(1500, 3000), 1)
end

function mob3890_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3890_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3890_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3890, 1, 'mob3890_Action')
RegisterUnitEvent(3890, 2, 'mob3890_Leave')
RegisterUnitEvent(3890, 3, 'mob3890_Kill')
RegisterUnitEvent(3890, 4, 'mob3890_Die')
